package com.example.demo.utils;

import org.springframework.web.servlet.view.InternalResourceViewResolver;

import java.util.Random;

/**
 * @author admin
 * @version 1.0 <br/>
 * <p style="font-family:SimSun;font-weight:bold">时间:<br/>2021/12/1 22:07</p>
 * @description
 */
public class SaltUtils {
    public static String getSalt(int n){
        char[] chars = "234567dnasuindU3u8912u%^ININ^%$#@".toCharArray();
        StringBuilder stringBuilder=new StringBuilder();
        for(int i=0;i<n;i++){
            char aChar = chars[new Random().nextInt(chars.length)];
            stringBuilder.append(aChar);
        }
        return stringBuilder.toString();
    }
}
